<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <div class="error-icon">
        <div class="number">404</div>
        <div class="magnifier">🔍</div>
      </div>
      
      <div class="error-message">
        <h2>页面未找到</h2>
        <p>抱歉，您访问的页面不存在或已被删除</p>
      </div>
      
      <div class="error-actions">
        <router-link to="/" class="home-btn">返回首页</router-link>
        <button @click="goBack" class="back-btn">返回上页</button>
      </div>
      
      <div class="suggestions">
        <h3>您可能在寻找：</h3>
        <ul>
          <li><router-link to="/">首页</router-link></li>
          <li><router-link to="/rumor-query">谣言查询</router-link></li>
          <li><router-link to="/knowledge">知识中心</router-link></li>
          <li><router-link to="/about">关于我们</router-link></li>
        </ul>
      </div>
    </div>
    
    <div class="decoration">
      <div class="floating-shield">🛡️</div>
      <div class="floating-search">🔍</div>
      <div class="floating-warning">⚠️</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NotFoundView',
  methods: {
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped>
.not-found-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.not-found-content {
  background: white;
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
}

.error-icon {
  position: relative;
  margin-bottom: 30px;
}

.number {
  font-size: 120px;
  font-weight: bold;
  color: #1e3c72;
  line-height: 1;
  margin-bottom: 10px;
}

.magnifier {
  font-size: 40px;
  position: absolute;
  top: 20px;
  right: 40px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(10deg); }
}

.error-message {
  margin-bottom: 40px;
}

.error-message h2 {
  color: #1e3c72;
  font-size: 28px;
  margin-bottom: 10px;
}

.error-message p {
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 40px;
}

.home-btn, .back-btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.home-btn {
  background: #1e3c72;
  color: white;
}

.home-btn:hover {
  background: #2a5298;
  transform: translateY(-2px);
}

.back-btn {
  background: #f8f9fa;
  color: #1e3c72;
  border: 2px solid #1e3c72;
}

.back-btn:hover {
  background: #1e3c72;
  color: white;
  transform: translateY(-2px);
}

.suggestions {
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.suggestions h3 {
  color: #1e3c72;
  font-size: 18px;
  margin-bottom: 15px;
}

.suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.suggestions li {
  margin-bottom: 8px;
}

.suggestions a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.suggestions a:hover {
  color: #1e3c72;
  text-decoration: underline;
}

.decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-shield,
.floating-search,
.floating-warning {
  position: absolute;
  font-size: 30px;
  opacity: 0.1;
  animation: floatRandom 6s ease-in-out infinite;
}

.floating-shield {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.floating-search {
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

.floating-warning {
  bottom: 30%;
  left: 25%;
  animation-delay: 4s;
}

@keyframes floatRandom {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(5deg); }
  50% { transform: translateY(-10px) rotate(-5deg); }
  75% { transform: translateY(-20px) rotate(3deg); }
}

@media (max-width: 768px) {
  .not-found-content {
    padding: 40px 20px;
  }
  
  .number {
    font-size: 80px;
  }
  
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .home-btn, .back-btn {
    width: 100%;
    max-width: 200px;
  }
}
</style> 